package day2;

import java.util.Scanner;

/**
 * 随机数
 */
public class Test10 {
    public static void main(String[] args) {
        // 随机数  返回的一个0~0.9999...的随机小数
        int luckNumber = (int)(10 * Math.random());
        System.out.println(luckNumber);
        Scanner input = new Scanner(System.in);
        System.out.print("请输入4位会员号:");
        int vipNo = input.nextInt();
        int value = vipNo % 10;
        if(luckNumber == value) {
            System.out.println("中奖");
        } else {
            System.out.println("很遗憾!");
        }





    }
}
